package com.taxi.comm.business.service.M001;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.taxi.comm.business.beans.DdzhmxbBw;
import com.taxi.comm.business.mapper.DdzhmxbBwMapper;

@Service
public class M001ServiceImpl extends M001Service
{

	private static final Logger log = LoggerFactory.getLogger(M001ServiceImpl.class);

	@Autowired
	private DdzhmxbBwMapper ddzhmxb_bw_Mapper;

	DdzhmxbBw signIn(M001Request request) throws Exception
	{
		DdzhmxbBw ddzhmxb_bw = new DdzhmxbBw();

		Date aDate = new Date();
		SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
		String formattedDate = formatter.format(aDate);
		ddzhmxb_bw.setZxrq(Integer.parseInt(formattedDate, 10));
		ddzhmxb_bw.setZxls(ddzhmxb_bw_Mapper.nextCLZTZHMXB_BWSeq());
		ddzhmxb_bw.setVer(request.Ver);
		ddzhmxb_bw.setBwls(request.BWLS);

		ddzhmxb_bw.setQqbz(request.QQBZ);
		ddzhmxb_bw.setYddm(request.YDDM);
		ddzhmxb_bw.setFsf(request.FSF);
		ddzhmxb_bw.setJsf(request.JSF);
		ddzhmxb_bw.setScsj(request.SCSJ);
		ddzhmxb_bw.setBwxh(request.BWXH);
		ddzhmxb_bw.setXtmc(request.XTMC);

		ddzhmxb_bw.setBwlx(request.BWLX);
		
		
		ddzhmxb_bw.setDcrj(request.DCRJ);
		ddzhmxb_bw.setLxh(request.LXH);
		ddzhmxb_bw.setSbhm(request.SBHM);
		ddzhmxb_bw.setBs(request.BS);
		ddzhmxb_bw.setCph(request.CPH);
		ddzhmxb_bw.setYyzh(request.YYZH);
		ddzhmxb_bw.setZyzh(request.ZYZH);
		ddzhmxb_bw.setSjxm(request.SJXM);
		ddzhmxb_bw.setCzgs(request.CZGS);
		ddzhmxb_bw.setJdddwd(request.JDDDWD);
		ddzhmxb_bw.setJdddjd(request.JDDDJD);
		ddzhmxb_bw.setJdsj(request.JDSJ);
		ddzhmxb_bw.setDdzt(request.DDZT);
		ddzhmxb_bw.setScddwd(request.SCDDWD);
		ddzhmxb_bw.setScddjd(request.SCDDJD);
		ddzhmxb_bw.setScdd(request.SCDD);
		ddzhmxb_bw.setMphm(request.MPHM);
		ddzhmxb_bw.setKjlk(request.KJLK);
		ddzhmxb_bw.setDbmc(request.DBMC);
		ddzhmxb_bw.setMdd(request.MDD);
		ddzhmxb_bw.setYjxx(request.YJXX);
		ddzhmxb_bw.setDdf(request.DDF);
		ddzhmxb_bw.setCkdh(request.CKDH);
		ddzhmxb_bw.setSjdh(request.SJDH);
		
		ddzhmxb_bw_Mapper.insert(ddzhmxb_bw);
		return ddzhmxb_bw;
	}

	public static void main(String[] args)
	{
		System.out.println(Integer.MAX_VALUE);
	}
}
